<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css" />
<link rel="stylesheet" href="${staticServer}/css/consultant_student_read.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/model_resp.js"></script>
<script src="${staticServer}/inc/js/datepicker.js"></script>
<script src="${staticServer}/inc/js/htmlfilter.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/tips.js"></script>
<style type="text/css">
#statelist label {
	display: block;
	float: left;
	width: 120px;
}
</style>
<script>
$(function(){
});

function submit(){
	window.location.href="${contextPath}/achieve/system_static_week.htm?startTime="+$("#startTime").val()+"&endTime="+$("#endTime").val();
}

function getXiaZai(){
	var startTime = $("#startTime").val();
	var endTime = $("#endTime").val();
	if(startTime==""){
		alert("开始时间不能为空");
		return;
	}
	if(endTime==""){
		alert("结束时间不能为空");
		return;
	}
	$.post('${contextPath}/achieve/system_static_weekXz.json',{
		startTime:startTime,
		endTime:endTime
	},function(data){
		if(data){
			if(data.name!=null){
				window.location.href = "http://120.55.241.58//mydata/uploadtea/xls/"+data.name;
			}
		}
	});
}
</script>
</head>

<body>
<#assign count=0/>
<#assign count1=0/>
<#assign count2=0/>
<#assign count3=0/>
<#assign count4=0/>
<#assign count5=0/>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>咨询师模块</li>
			<li>&gt;</li>
			<li class="current">客户资源列表</li>
		</ul>
	</div>
	<div id="container">
		<div id="title"></div>
		<table class="form_table">
			<tr>
				<td>
					<div style="overflow: hidden;">
						<label><b>查询条件：</b></label>
						<label for="start_date">日期：</label>
						<input type="text" id="startTime" size="15" value="${startTime}" rel="DATE::Y-m-d" /> 
						<input type="text" id="endTime" size="15" value="${endTime}" rel="DATE::Y-m-d" /> 
						<input type="button" value=" 查 询 " onclick="submit()" />
						<input type="button" value=" 下 载 " onclick="getXiaZai()" />
					</div>
				</td>
			</tr>
		</table>
		<table style="width:98%;">
			<tr class="fields">
				<th>中心地址</th>
				<th>课程顾问</th>
				<th>带教老师</th>
				<th>新增业绩</th>
				<th>接待测评量</th>
				<th>成单数</th>
				<th>成单率</th>
				<th>业绩/接待测评量</th>
				<th>市场新增业绩</th>
				<th>市场接待测评量</th>
				<th>市场成单数</th>
				<th>市场成单率</th>
			</tr>
			<#if list??>
				<#list list as list>
				<tr class="even_row">
					<td align="center">${list.center}</td>
					<td align="center">${list.nickname}</td>
					<td align="center">${list.dj_nickname}</td>
					<td align="center">${list.xzMoneys}</td>
					<td align="center">${list.cpCount}</td>
					<td align="center">${list.jtCount}</td>
					<td align="center">
						<#if list.cpCount==0>
							0%
						<#else>
							${(list.jtCount/list.cpCount)?string.percent}
						</#if>
					</td>
					<td align="center">
						<#if list.cpCount==0>
							0
						<#else>
							${list.xzMoneys/list.cpCount}
						</#if>
					</td>
					<td align="center">${list.scMoney}</td>
					<td align="center">${list.scCount}</td>
					<td align="center">${list.sccdCount}</td>
					<td align="center">
						<#if list.scCount==0>
							0%
						<#else>
							${(list.sccdCount/list.scCount)?string.percent}
						</#if>
					</td>
            	</tr>
            	
            	<#assign count=count+list.xzMoneys />
            	<#assign count1=count1+list.cpCount />
            	<#assign count2=count2+list.jtCount />
            	<#assign count3=count3+list.scMoney />
            	<#assign count4=count4+list.scCount />
            	<#assign count5=count5+list.sccdCount />
            	</#list>
            	
            	<tr class="even_row">
            		<td align="center">总计</td>
            		<td align="center"></td>
            		<td align="center"></td>
            		<td align="center">${count}</td>
            		<td align="center">${count1}</td>
            		<td align="center">${count2}</td>
            		<td align="center"></td>
            		<td align="center"></td>
            		<td align="center">${count3}</td>
            		<td align="center">${count4}</td>
            		<td align="center">${count5}</td>
            		<td align="center"></td>
				</tr>
			</#if>
		</table>
	</div>
	<div class="emptyline"></div>
	
</body>
</html>